<template>
    <div class="person">
        <h2>姓名：{{name}}</h2>
        <h2>年龄：{{age}}</h2>
        <button @click="changeName()">修改姓名</button>
        <button @click="changeAge()">修改年龄</button>
        <button @click="checkTel()">获取联系方式</button>
    </div>

</template>
<script lang="ts">
export default{
    name:"Person0906",
    data() {
        return{
            name:"张三",
            age:22
        }
    },
    methods:{
        changeName(){
            this.name="tom"
        },
        changeAge(){
            this.age++
        },
        checkTel(){
            alert("15896985555")
        }

    }
}

</script>
<style>
.person{
    background-color: lightseagreen;
	box-shadow: 6px 6px 12px gray;
	border-radius: 6px;
	line-height: 40px;
	padding:10px;

}
</style>